import commissionApi from "@/api/declaration/mall/commissionApi"
import httpRequest from "@/config/axios/httpRequest"
import { BrokerageWithdrawModel } from "@/models/mall/BrokerageWithdrawModel"

// 查询佣金提现列表
export const getBrokerageWithdrawPage = async (params: any) => {
  return await httpRequest.get(commissionApi.GetBrokerageWithdrawPage, { params })
}

// 查询佣金提现详情
export const getBrokerageWithdraw = async (id: number) => {
  return await httpRequest.get(commissionApi.GetBrokerageWithdraw, { params: { id } })
}

// 佣金提现 - 通过申请
export const approveBrokerageWithdraw = async (id: number) => {
  return await httpRequest.put(commissionApi.ApproveBrokerageWithdraw, { params: { id } })
}

// 审核佣金提现 - 驳回申请
export const rejectBrokerageWithdraw = async (data: BrokerageWithdrawModel) => {
  return await httpRequest.put(commissionApi.RejectBrokerageWithdraw, data)
}
